<!--
 * @Description: 
 * @Author: your name
 * @version: 
 * @Date: 2023-12-26 14:29:03
 * @LastEditors: your name
 * @LastEditTime: 2023-12-26 14:29:05
-->
<!--
 * @Author: wangshiyang
 * @Date: 2023-05-04 10:04:01
 * @LastEditors: your name
 * @LastEditTime: 2023-12-18 15:47:50
 * @Description: 展示全场景
-->
<template>
    <div class="dataS">
        <!-- 顶部数据展示 -->
        <div class="bottomHead">
            <div v-for="item in renderData" class="headItem">
                <div class="icon">
                    <img :src="item.icon" alt="">
                    <img src="/src/assets/bigscreenAssets/baseBottom.png" alt="">
                </div>
                <div class="data">
                    <div class="mount">{{ item.value }}</div>
                    <div class="dataTitlt">{{ item.title }}</div>
                </div>
            </div>
        </div>
        <!-- 左侧数据展示 -->
        <div class="leftArea">
            <panel :panelStyle="{ height: '33%' }">
                <template #head>
                    <span>设施情况</span>
                </template>
                <template #content>
                    <div id="pipeChart3D" :style="{ width: '100%', height: '100%' }">
                    </div>
                </template>
            </panel>
            <panel :panelStyle="{ height: '33%' }">
                <template #head>
                    <span>社区投诉排名</span>
                </template>
                <template #content>
                    <div id="communityChart" :style="{ width: '100%', height: '100%' }">
                    </div>
                </template>
            </panel>
            <panel :panelStyle="{ height: '33%' }">
                <template #head>
                    <span>人口趋势</span>
                </template>
                <template #content>
                    <div id="peopleChart" :style="{ width: '100%', height: '100%' }">
                    </div>
                </template>
            </panel>
        </div>
        <!-- 右侧数据展示 -->
        <div class="rightArea">
            <panel :panelStyle="{ height: '32%' }">
                <template #head>
                    <span>数据总览</span>
                </template>
                <template #content>
                    <div id="dataViewer" :style="{ width: '100%', height: '100%' }">
                    </div>
                </template>
            </panel>
            <panel :panelStyle="{ height: '32%', marginTop: '10px' }">
                <template #head>
                    <span>事件统计</span>
                </template>
                <template #content>
                    <div id="eventStatstic" :style="{ width: '100%', height: '100%' }">
                    </div>
                </template>
            </panel>
            <panel :panelStyle="{ height: '32%', marginTop: '10px' }">
                <template #head>
                    <span>预警动态</span>
                </template>
                <template #content>
                    <scrollTable />
                </template>
            </panel>
        </div>
    </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import panel from '../components/panel.vue';
import {headerData,initEchart} from '../staticData'
import scrollTable from '../components/scrollTable.vue'
const renderData=ref(headerData)
onMounted(()=>{
    initEchart()
})
</script>

<style lang="scss">
.dataS {
    position: absolute;
    pointer-events: all;
    top: 92px;
    left: 0;

    .bottomHead {
        width: 100vw;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #fff;
        padding: 0 30px;

        .headItem {
            display: flex;
            align-items: center;
            width: 295px;
            height: 92px;
            border: 1px solid #275079;
            background: #123251b9;
            background-blend-mode: normal;
            padding-left: 34px;

            .data {
                display: flex;
                flex-direction: column;

                .mount {
                    color: #ebf4ff;
                    font-family: YouSheBiaoTiHei;
                    font-size: 24px;
                    font-weight: 400;
                    line-height: 31px;
                }

                .dataTitlt {
                    color: #90d7fc;
                    font-family: "uniqueID∞version∞MicrosoftYaHei∞Regular";
                    font-size: 18px;
                    font-weight: 400;
                }
            }

            .icon {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                width: 64px;
                height: 54px;
                position: relative;
                margin-right: 34px;

                >:first-child {
                    position: absolute;
                    top: 0;
                    z-index: 10;
                }

                >:last-child {
                    position: absolute;
                    bottom: 0;
                }
            }
        }
    }

    .chartArea {
        width: 100%;
    }

    .leftArea,
    .rightArea {
        padding: 15px;
        width: 400px;
        height: 70vh;
        position: absolute;
        top: 130px;
        border: 1px dashed #275079;
        background: linear-gradient(49deg, #081f3798 0%, #123251a8 100%);
        background-blend-mode: normal;
    }

    .leftArea {
        left: 30px;
        padding-bottom: 0;
    }

    .rightArea {
        right: 30px;

        .tableWrapper {
            width: 100%;
            height: 100%;
        }
    }
}

.ant-table {
    background: transparent;
    color: #fff;
}

.ant-table-cell {
    max-width: 100px;
    color: #fff;
}

.ant-table-small .ant-table-thead>tr>th {
    background: transparent;
    color: #fff;
}

// table scrollbar
.ant-table-body {
    &::-webkit-scrollbar {
        height: 5px;
    }

    &::-webkit-scrollbar-thumb {
        border-radius: 5px;
        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        background: rgba(129, 129, 128, 0.85);
    }

    &::-webkit-scrollbar-track {
        -webkit-box-shadow: none;
        border-radius: 0;
        background: rgba(0, 4, 40, 0.06);
    }
}</style>
